package com.ly.count.http;

import lombok.Getter;



public enum CplusHttpStatus  {
    APP_ERROR(1000, "系统出现异常，请稍后再试"),
    APP_PARAM_ERROR(1001, "请求参数有误，请检查后重试"),
    APP_SERVICE_ERROR(1002, "服务暂时不可用，请稍后再试"),
    APP_DB_ERROR(1003, "数据库操作失败，请联系管理员"),

    // 登录状态编码从6000开始
    LOGIN_SUCCESS(6000, "登录成功"),
    LOGIN_USERNAME_OR_PASSWORD_ERROR(6001, "用户名或密码错误"),
    LOGIN_USER_NOT_FOUND(6002, "用户不存在"),
    LOGIN_ACCOUNT_LOCKED(6003, "账户已被锁定，请联系管理员"),
    LOGIN_INVALID_TOKEN(6004, "无效的登录凭证"),
    LOGIN_TOKEN_EXPIRED(6005, "登录凭证已过期，请重新登录"),
    LOGIN_TOO_MANY_ATTEMPTS(6006, "尝试次数过多，请稍后再试"),
    LOGIN_TWO_FACTOR_AUTH_REQUIRED(6007, "需要二次验证"),
    LOGIN_TWO_FACTOR_AUTH_FAILED(6008, "二次验证失败"),
    LOGIN_CAPTCHA_REQUIRED(6009, "需要验证码"),
    LOGIN_CAPTCHA_INVALID(6010, "验证码错误"),
    LOGIN_PARAM_NPE(6011, "请输入登录用户信息"),

    // 房间状态编码从7000开始
    // 积分编码从8000开始
    APP_SUCCESS(200, "成功"),
    FAIL(500, "失败"),
    NO_LOGIN(401, "未登录"),
    NO_AUTHORITY(403, "无权限"),
    NO_DATA(404, "无数据"),
    NO_PARAM(405, "参数错误"),
    NO_SERVER(500, "服务器错误"),
    NO_SERVICE(501, "服务异常"),
    NO_NETWORK(502, "网络异常"),
    NO_DB(503, "数据库异常"),
    NO_FILE(504, "文件异常"),
    NO_OTHER(999, "其他异常");


    @Getter
    private int code;
    @Getter
    private String message;

    private CplusHttpStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }


}
